useFixture(default)

def test():
	from Modules import commonBits
	java_recorded_version = '1.5.0_11'

	if window('Protocol Buffer Editor'):
		select('FileChooser', commonBits.sampleDir() + 'Ams_LocDownload_20041228.bin')
		#commonBits.setRecordLayout(select, 'ams Store')

		click('Edit1')
		rightclick('Table', '4|Loc_Name,2')
		select_menu('Edit Record')
		click('Find1')
		#click('MetalInternalFrameTitlePane', 203, 17)
		select('TextField', 'West')
		click('Find1')
		select('Table', 'cell:Data,3(Miranda)')
		select('Table', 'cell:Data,3(Miranda)')
		assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5037, 5037], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Miranda, Miranda], [Loc_Addr_Ln1, 5, , Westfield Shoppingtown, Westfield Shoppingtown], [Loc_Addr_Ln2, 6, , Cnr. Urunga Pde & The Kingsway, Cnr. Urunga Pde & The Kingsway], [Loc_Addr_Ln3, 7, , Miranda, Miranda], [Loc_Postcode, 8, , 2228, 2228], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]')
		select('Table', 'cell:Data,3(Miranda)')
		click('Find1')
		select('TextField', 'Liverpool')
		click('Find1')
		select('Table', 'cell:Data,3(Liverpool)')
		assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5093, 5093], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Liverpool, Liverpool], [Loc_Addr_Ln1, 5, , Westfield Phoenix Plaza, Westfield Phoenix Plaza], [Loc_Addr_Ln2, 6, , Northumberland Street, Northumberland Street], [Loc_Addr_Ln3, 7, , Liverpool, Liverpool], [Loc_Postcode, 8, , 2170, 2170], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]')
		select('Table', 'cell:Data,3(Liverpool)')
		click('Find1')
		select('TextField', 'Eastgarden')
		click('Find1')
		select('Table', 'cell:Data,3(Eastgarden)')
		assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5095, 5095], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Eastgarden, Eastgarden], [Loc_Addr_Ln1, 5, , Westfield Shoppingtown Eastgardens, Westfield Shoppingtown Eastgardens], [Loc_Addr_Ln2, 6, , 152 Bunnerong Road, 152 Bunnerong Road], [Loc_Addr_Ln3, 7, , Eastgardens, Eastgardens], [Loc_Postcode, 8, , 2036, 2036], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]')
		select('Table', 'cell:Data,3(Eastgarden)')
		click('Find1')
		select('Table', 'cell:Data,3(Liverpool)')
		#assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5093, 5093], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Liverpool, Liverpool], [Loc_Addr_Ln1, 5, , Westfield Phoenix Plaza, Westfield Phoenix Plaza], [Loc_Addr_Ln2, 6, , Northumberland Street, Northumberland Street], [Loc_Addr_Ln3, 7, , Liverpool, Liverpool], [Loc_Postcode, 8, , 2170, 2170], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]')
		select('Table', 'cell:Data,3(Liverpool)')
		click('Find1')
		select('Table', 'cell:Data,3(Miranda)')
		#assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5037, 5037], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Miranda, Miranda], [Loc_Addr_Ln1, 5, , Westfield Shoppingtown, Westfield Shoppingtown], [Loc_Addr_Ln2, 6, , Cnr. Urunga Pde & The Kingsway, Cnr. Urunga Pde & The Kingsway], [Loc_Addr_Ln3, 7, , Miranda, Miranda], [Loc_Postcode, 8, , 2228, 2228], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]')
		select('Table', 'cell:Data,3(Miranda)')
		select('ComboBox', 'Loc_Addr_Ln1')
		click('Find1')
		#assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5093, 5093], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Liverpool, Liverpool], [Loc_Addr_Ln1, 5, , Westfield Phoenix Plaza, Westfield Phoenix Plaza], [Loc_Addr_Ln2, 6, , Northumberland Street, Northumberland Street], [Loc_Addr_Ln3, 7, , Liverpool, Liverpool], [Loc_Postcode, 8, , 2170, 2170], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]')
		click('Find1')
		select('Table', 'cell:Data,5(152 Bunnerong Road)')
		#assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5095, 5095], [Loc_Type, 3, , ST, ST], [Loc_Name, 4, , Eastgarden, Eastgarden], [Loc_Addr_Ln1, 5, , Westfield Shoppingtown Eastgardens, Westfield Shoppingtown Eastgardens], [Loc_Addr_Ln2, 6, , 152 Bunnerong Road, 152 Bunnerong Road], [Loc_Addr_Ln3, 7, , Eastgardens, Eastgardens], [Loc_Postcode, 8, , 2036, 2036], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]')
		select('Table', 'cell:Data,5(152 Bunnerong Road)')
		click('Find1')
		select('TextField', 'nsw')
		click('Find1')
		select('Table', 'cell:Data,3(State  Warehouse NSW)')
##		assert_p('Table', 'Content', '[[Brand_Id, 1, , TAR, TAR], [Loc_Nbr, 2, , 5954, 5954], [Loc_Type, 3, , DC, DC], [Loc_Name, 4, , State  Warehouse NSW, State  Warehouse NSW], [Loc_Addr_Ln1, 5, , Target State Warehouse NSW (Westgate), Target State Warehouse NSW (Westgate)], [Loc_Addr_Ln2, 6, , Warehouse D Murtha Street, Warehouse D Murtha Street], [Loc_Addr_Ln3, 7, , Arndell Park, Arndell Park], [Loc_Postcode, 8, , 2148, 2148], [Loc_State, 9, , NSW, NSW], [Loc_Actv_Ind, 10, , A, A]]')
		select('Table', 'cell:Data,3(State  Warehouse NSW)')
		select('ComboBox1', ' = ')
		click('Find1')
		select('Table', 'cell:Data,4(Shopping Centre)')
##		click('BasicInternalFrameTitlePane$NoFocusButton5')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
##		click('BasicInternalFrameTitlePane$NoFocusButton2')
	close()
